package com.expressage.service.impl;

import com.expressage.dao.SortDao;
import com.expressage.po.Sort;
import com.expressage.service.SortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 快递类别业务逻辑实现类
 */
@Service
public class SortServiceImpl implements SortService {

    @Autowired
    SortDao sortDao;

    @Override
    public List<Sort> findAll() {
        return sortDao.findAll();
    }

    @Override
    public Sort findBySortid(int sortid) {
        return sortDao.findBySortid(sortid);
    }

    @Override
    public boolean insert(Sort sort) {
        return sortDao.insert(sort)>0?true:false;
    }

    @Override
    public boolean delete(int[] sortid) {
        return sortDao.delete(sortid)>0?true:false;
    }

    @Override
    public boolean update(Sort sort) {
        return sortDao.update(sort)>0?true:false;
    }
}
